﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UniversityHomeTask
{
    class Department
    {
        public string name;
        public List<Group> groups = new List<Group>();
        private static int departmentCount;

        public static Department GenerateDepartment()
        {
            Department dep = new Department();
            dep.name = "Department" + Department.departmentCount;
            Department.departmentCount++;
            for (int i = 0; i < 5; i++)
            {
                Group group = new Group();
                group.GenerateGroup();
                dep.groups.Add(group);
            }
            return dep;
        }
        public void PrintDepartment()
        {
            Console.WriteLine("Department: {0}", name);
            int i = 0;
            foreach (var group in groups)
            {
                Console.WriteLine("{0} {1}", i, group.name);
                i++;
            }
        }

        public void PrintStudents()
        {
           foreach (var group in Group)
            {
                student.PrintInfo();
                Console.WriteLine();
            }
        }

    }
}
